import request from '@/utils/request'
const baseUrl = '/ap/net/tool'
export class NetworkTestApi {
    //开始ping
    static startPing(data:any){
        return request(`${baseUrl}/ping_start`,{
            method:"POST",
            data
        })
    }

    // 停止Ping
    static stopPing(){
        return request(`${baseUrl}/ping_stop`,{
            method:"POST",
        })
    }

    //ping获取结果
    static reqGetPingResult(){
        return request(`${baseUrl}/ping_status`,{
            method:"POST",
        })
    }

    //开始iperf3测试
    static startIperf3Test(data:any){
        return request(`${baseUrl}/iperf3_client`,{
            method:"POST",
            data
        })
    }

    //开始iperf3服务端测试
    static startIperf3Server(data:any){
        return request(`${baseUrl}/iperf3_server`,{
            method:"POST",
            data
        })
    }

    //停止测试
    static reqStopIperf3Test(){
        return request(`${baseUrl}/iperf3_stop`,{
            method:"POST",
        })
    }

    //获取iperf3测试结果
    static reqGetIperf3Result(){
        return request(`${baseUrl}/iperf3_get`,{
            method:"POST",
        })
    }
}